﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="grid-with-ods.aspx.cs" Inherits="Dala.Samples.Grid_View.grid_with_ods" %>

<%@ Register Src="~/Bread-Crumb-Control/bread-crumb.ascx" TagName="BreadCrumb" TagPrefix="uc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <uc:BreadCrumb ID="ucBreadCrumb" runat="server" BreadCrumbTitle="GridView Example" />
    <h2>
        GridView With Object Datasource</h2>
    <br />
    <div style="width: 600px;">
        <asp:GridView ID="gridViewProduct" runat="server" CssClass="table table-bordered table-striped" ClientIDMode="Static" DataSourceID="odsProduct" PageSize="5"
        DataKeyNames="ProductId" AllowPaging="True">
        </asp:GridView>
        <asp:ObjectDataSource ID="odsProduct" runat="server" TypeName="Dala.Samples.BusinessLogicLayer.ProductBLL"
            SelectMethod="GetAllProductPaged" SelectCountMethod="GetTotalCountOfProductPaged"
            SortParameterName="orderBy" MaximumRowsParameterName="maximumRows" StartRowIndexParameterName="startRowIndex" EnablePaging="true">
            <SelectParameters>
                <asp:Parameter Name="orderBy" Type="String" />
                <asp:Parameter Name="startRowIndex" Type="Int32" />
                <asp:Parameter Name="maximumRows" Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
</asp:Content>
